import 'package:safetymonitor/generated/json/base/json_convert_content.dart';
import 'package:safetymonitor/app/data/entities/home/warning/get_by_alarm_id_entity.dart';

GetByAlarmIdEntity $GetByAlarmIdEntityFromJson(Map<String, dynamic> json) {
  final GetByAlarmIdEntity getByAlarmIdEntity = GetByAlarmIdEntity();
  final String? createTime = jsonConvert.convert<String>(json['createTime']);
  if (createTime != null) {
    getByAlarmIdEntity.createTime = createTime;
  }
  final String? updateTime = jsonConvert.convert<String>(json['updateTime']);
  if (updateTime != null) {
    getByAlarmIdEntity.updateTime = updateTime;
  }
  final String? creator = jsonConvert.convert<String>(json['creator']);
  if (creator != null) {
    getByAlarmIdEntity.creator = creator;
  }
  final String? updater = jsonConvert.convert<String>(json['updater']);
  if (updater != null) {
    getByAlarmIdEntity.updater = updater;
  }
  final bool? deleted = jsonConvert.convert<bool>(json['deleted']);
  if (deleted != null) {
    getByAlarmIdEntity.deleted = deleted;
  }
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    getByAlarmIdEntity.id = id;
  }
  final int? companyId = jsonConvert.convert<int>(json['companyId']);
  if (companyId != null) {
    getByAlarmIdEntity.companyId = companyId;
  }
  final int? systemId = jsonConvert.convert<int>(json['systemId']);
  if (systemId != null) {
    getByAlarmIdEntity.systemId = systemId;
  }
  final int? alarmId = jsonConvert.convert<int>(json['alarmId']);
  if (alarmId != null) {
    getByAlarmIdEntity.alarmId = alarmId;
  }
  final int? superviseUserId = jsonConvert.convert<int>(json['superviseUserId']);
  if (superviseUserId != null) {
    getByAlarmIdEntity.superviseUserId = superviseUserId;
  }
  final String? superviseType = jsonConvert.convert<String>(json['superviseType']);
  if (superviseType != null) {
    getByAlarmIdEntity.superviseType = superviseType;
  }
  final int? superviseObjId = jsonConvert.convert<int>(json['superviseObjId']);
  if (superviseObjId != null) {
    getByAlarmIdEntity.superviseObjId = superviseObjId;
  }
  final String? superviseStatus = jsonConvert.convert<String>(json['superviseStatus']);
  if (superviseStatus != null) {
    getByAlarmIdEntity.superviseStatus = superviseStatus;
  }
  final String? superviseUserName = jsonConvert.convert<String>(json['superviseUserName']);
  if (superviseUserName != null) {
    getByAlarmIdEntity.superviseUserName = superviseUserName;
  }
  final String? superviseObjName = jsonConvert.convert<String>(json['superviseObjName']);
  if (superviseObjName != null) {
    getByAlarmIdEntity.superviseObjName = superviseObjName;
  }
  return getByAlarmIdEntity;
}

Map<String, dynamic> $GetByAlarmIdEntityToJson(GetByAlarmIdEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['createTime'] = entity.createTime;
  data['updateTime'] = entity.updateTime;
  data['creator'] = entity.creator;
  data['updater'] = entity.updater;
  data['deleted'] = entity.deleted;
  data['id'] = entity.id;
  data['companyId'] = entity.companyId;
  data['systemId'] = entity.systemId;
  data['alarmId'] = entity.alarmId;
  data['superviseUserId'] = entity.superviseUserId;
  data['superviseType'] = entity.superviseType;
  data['superviseObjId'] = entity.superviseObjId;
  data['superviseStatus'] = entity.superviseStatus;
  data['superviseUserName'] = entity.superviseUserName;
  data['superviseObjName'] = entity.superviseObjName;
  return data;
}

extension GetByAlarmIdEntityExtension on GetByAlarmIdEntity {
  GetByAlarmIdEntity copyWith({
    String? createTime,
    String? updateTime,
    String? creator,
    String? updater,
    bool? deleted,
    int? id,
    int? companyId,
    int? systemId,
    int? alarmId,
    int? superviseUserId,
    String? superviseType,
    int? superviseObjId,
    String? superviseStatus,
    String? superviseUserName,
    String? superviseObjName,
  }) {
    return GetByAlarmIdEntity()
      ..createTime = createTime ?? this.createTime
      ..updateTime = updateTime ?? this.updateTime
      ..creator = creator ?? this.creator
      ..updater = updater ?? this.updater
      ..deleted = deleted ?? this.deleted
      ..id = id ?? this.id
      ..companyId = companyId ?? this.companyId
      ..systemId = systemId ?? this.systemId
      ..alarmId = alarmId ?? this.alarmId
      ..superviseUserId = superviseUserId ?? this.superviseUserId
      ..superviseType = superviseType ?? this.superviseType
      ..superviseObjId = superviseObjId ?? this.superviseObjId
      ..superviseStatus = superviseStatus ?? this.superviseStatus
      ..superviseUserName = superviseUserName ?? this.superviseUserName
      ..superviseObjName = superviseObjName ?? this.superviseObjName;
  }
}